package com.lyr.common.uidgeneratorplus.controller;


import com.lyr.common.uidgeneratorplus.service.UidGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lyr
 * @since 2020-10-21
 */
@RestController
@RequestMapping("/web/test")
public class TestController {

    @Autowired
    private UidGenerator uidGenerator;

    @GetMapping("tt")
    public void insert(){
        long uid = uidGenerator.getUID();
        System.out.println("我是生成的uid:"+uid);
        System.out.println("我是parseUid:"+uidGenerator.parseUID(uid));


    }
}

